<table id="advTable" class="table table-bordered">
    <thead>
    <tr>
        <th>id</th>
        <th>广告标题</th>
        <th>广告图片</th>
        <th>广告类别</th>
        <th>广告链接</th>
        <th>广告排序</th>
        <th>添加时间</th>
        <th>修改时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <%= $.advList.map((item) => `
            <tr>
                <td>${item._id}</td>
                <td>${item.advTitle}</td>
                <td><img height="80" src="/api/${item.advPic}" alt=""></td>
                <td>${$.advTypeEnum[item.advType]}</td>
                <td>${item.advHref}</td>
                <td>${item.advOrder}</td>
                <td>${item.addTime}</td>
                <td>${item.upTime}</td>
                <td>
                    <button type="button" class="btn btn-danger btn-sm">删除</button>
                    <button data-id="${item._id}" type="button" class="btn btn-success btn-sm">修改</button>
                </td>
            </tr>
        `).join("") %>


    </tbody>
</table>
<!-- /.card-body -->
<div class="card-footer clearfix" id="pageDiv">
    <ul id="pageUl" class="pagination pagination-sm m-0 float-right">
        <li style="display: <%= $.pageNo===1?'none':'block'%>" class="page-item">
            <a data-page="<%= $.pageNo-1%>" href="javascript:;" class="page-link">«</a>
        </li>
        <%= new Array($.pageSum).fill().map((_,index)=>(`
            <li class="page-item ${$.pageNo===(index+1)?'active':''}">
                <a data-page="${index+1}" class="page-link" href="javascript:;">${index+1}</a>
            </li>
        `)).join("")%>


        <li style="display: <%= $.pageNo===$.pageSum?'none':'block'%>" class="page-item">
            <a  data-page="<%= $.pageNo+1%>" href="javascript:;" class="page-link">»</a>
        </li>
    </ul>
</div>